package com.codeoss.module.res.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.codeoss.framework.service.impl.BaseService;
import com.codeoss.module.res.dao.ResRoleMapper;
import com.codeoss.module.res.model.ResRole;
import com.codeoss.module.res.service.IResRoleService;

@Service
public class ResRoleService extends BaseService<ResRoleMapper, ResRole> implements IResRoleService {

	@Override
	public List<ResRole> getResRoleListByUserId(Long resUserId) {
		// TODO Auto-generated method stub
		QueryWrapper<ResRole> query=new QueryWrapper<ResRole>();
		query.inSql("id","(select res_role_id from res_rel_user_role where res_user_id="+resUserId+")");
		return list(query);
	}
}